package temp;

/**
 * @package PACKAGE_NAME
 * @Class temp.Task
 * @Description TODO
 * @Author zhangxinhua
 * @Date 19-11-18 上午11:39
 */
public class Task implements Runnable{
    private int num;
    public Task(int num) {
        this.num=num;
    }
    @Override
    public void run() {
        System.out.println("正在执行任务  "+num);
        try {
            Thread.sleep(4000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println("线程"+num+"执行完毕");
    }
}
